package GameFoundation
{
	import com.cheezeworld.screens.AScreen;
	import com.cheezeworld.screens.IScreenItem;
	import com.cheezeworld.screens.Root;
	import com.cheezeworld.utils.Input;
	import com.cheezeworld.utils.KeyCode;
	
	import flash.text.TextField;

	public class Screen1 extends AScreen
	{
		public function Screen1(parentScreen:IScreenItem=null)
		{
			super(parentScreen);
			
			var txt:TextField = new TextField();
			txt.htmlText = "<font color='#FFFFFF'> Screen 1 </font>";
			txt.x = 100;
			txt.y = 100;
			addChild( txt );
			trace( "<Screen1> What's up!" );
		}
		
		public override function update(timePassed:int):void
		{
			if( Input.instance.isKeyPressed( KeyCode.ENTER ) )
			{
				setScreen( Screen2 );
			}
		}
		
	}
}